<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>奔跑的熊</title>
    <style>
        body{
            background-color: #cccccc;
        }
        .box1{
            position: absolute;
            top: 260px;
            width: 200px;
            height: 100px;
            background: url("./img/bear.png") ;
            animation: bear 2s steps(8) infinite,move 10s forwards;

        }
        .box2{
            transform: translateY(200px);
            width: 1400px;
            height: 300px;
            background:url("./img/bag.png") no-repeat;
            animation:bear 20s linear infinite ;

        }
        .box3{
            transform: translateY(-400px);
            width: 1400px;
            height: 300px;
            background:url("./img/bag2.png") no-repeat ;
            animation:bear 20s linear infinite ;

        }
        @keyframes bear {
            0%{
                background-position: 0 0;
            }
            100%{
                background-position: -1600px 0;
            }
        }
        @keyframes move {
            0%{
                left: 0;
            }
            100%{
                left: 50%;
                transform: translateX(-50%);
            }
        }
    </style>
</head>
<body>
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</body>
</html>